﻿using System.ComponentModel.DataAnnotations;

namespace LogNet6.Sqlite;
/// <summary>
/// 日志记录
/// </summary>
public class SqliteLoggerItem
{
    /// <summary>
    /// 自增长主键
    /// </summary>
    [Display(Name = "序号")]
    public long Id { get; set; } = default!;
    /// <summary>
    /// 分类
    /// </summary>
    [Display(Name = "分类")]
    public string CategoryName { get; set; } = default!;
    /// <summary>
    /// 等级
    /// </summary>
    [Display(Name = "等级")]
    public string LogLevel { get; set; } = default!;
    /// <summary>
    /// 内容
    /// </summary>
    [Display(Name = "内容")]
    public string Message { get; set; } = default!;
    /// <summary>
    /// 日期
    /// </summary>
    [Display(Name = "日期")]
    public DateTime DateTime { get; set; } = default!;
    /// <summary>
    /// 
    /// </summary>
    /// <param name="id">自增长主键</param>
    /// <param name="categoryName"></param>
    /// <param name="logLevel"></param>
    /// <param name="message"></param>
    /// <param name="dateTime"></param>
    public SqliteLoggerItem(long id, string categoryName, string logLevel, string message, DateTime dateTime)
    {
        Id = id;
        CategoryName = categoryName;
        LogLevel = logLevel;
        Message = message;
        DateTime = dateTime;
    }
}

